/*
 * topological-hex, a program to compute combinatorial hexahedral meshes.
 *
 * Copyright (C) <2018> <Université catholique de Louvain (UCL), Belgique>
 *
 * List of the contributors to the development, description and complete
 * License: see LICENSE file.
 *
 * This program (topological-hex) is free software:
 * you can redistribute it and/or modify it under the terms
 * of the GNU General Public License as published by the Free
 * Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program (see COPYING file).  If not,
 * see <http://www.gnu.org/licenses/>.
 */

#include <check.h>
#include <stdlib.h>

Suite *types_suite(void);
Suite *utils_suite(void);
Suite *errors_suite(void);
Suite *vertex_set_suite(void);
Suite *sparse_set_suite(void);
Suite *compatibility_suite(void);
Suite *mesh_suite(void);
Suite *solver_suite(void);
Suite *lower_bound_suite(void);
Suite *dual_suite(void);
Suite *queue_suite(void);
Suite *protocol_suite(void);
Suite *distributed_suite(void);

int main(int argc, char **argv) {
  srand(99);

  SRunner *runner = srunner_create(types_suite());
  srunner_add_suite(runner, utils_suite());
  srunner_add_suite(runner, errors_suite());
  srunner_add_suite(runner, vertex_set_suite());
  srunner_add_suite(runner, sparse_set_suite());
  srunner_add_suite(runner, compatibility_suite());
  srunner_add_suite(runner, mesh_suite());
  srunner_add_suite(runner, solver_suite());
  srunner_add_suite(runner, lower_bound_suite());
  srunner_add_suite(runner, dual_suite());
  srunner_add_suite(runner, queue_suite());
  srunner_add_suite(runner, protocol_suite());
  srunner_add_suite(runner, distributed_suite());

  srunner_run_all(runner, CK_NORMAL);
  int fails = srunner_ntests_failed(runner);

  srunner_free(runner);

  return fails == 0 ? 0 : 1;
}
